//
//  CYListViewController.m
//  Demo
//
//  Created by lc4y on 2017/11/5.
//  Copyright © 2017年 lc4y. All rights reserved.
//

#import "CYListViewController.h"

@interface CYListViewController ()

@end

@implementation CYListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self cy_configSubView];
    [self cy_configSubViewStyle];
    [self cy_masLayoutSubView];
}


- (void)cy_configSubView {}

- (void)cy_configSubViewStyle {}

- (void)cy_masLayoutSubView {}


- (void)cy_createListView:(NSString *)listViewClass viewType:(CYListViewType)viewType {
    switch (viewType) {
        case CYListViewTableView:
            self.cy_listView = [[NSClassFromString(listViewClass) alloc] init];
            self.cy_listView.cy_eventDelegate = self;
            [self.view addSubview:self.cy_listView];
            break;
        case CYListViewCollectionView:
            self.cy_collectionView = [[NSClassFromString(listViewClass) alloc] init];
            self.cy_collectionView.cy_eventDelegate = self;
            [self.view addSubview:self.cy_collectionView];
            break;
        default:
            break;
    }
}

- (void)cy_createListView:(NSString *)listViewClass listViewStyle:(UITableViewStyle)listStyle {
    self.cy_listView = [[NSClassFromString(listViewClass) alloc] initWithStyle:listStyle];
    self.cy_listView.cy_eventDelegate = self;
    [self.view addSubview:self.cy_listView];
}

- (void)cy_createCollectionView:(NSString *)listViewClass collectionViewLayout:(UICollectionViewFlowLayout *)layout {
    self.cy_collectionView = [[NSClassFromString(listViewClass) alloc] initWithLayout:layout];
    self.cy_collectionView.cy_eventDelegate = self;
    [self.view addSubview:self.cy_collectionView];
}

- (void)cy_didSelectCellRow:(NSIndexPath *)rowIndexPath {}

- (void)cy_editCellRow:(NSIndexPath *)rowIndexPath menuIndex:(NSInteger)menuIndex {}

@end
